package utils;

import java.util.HashMap;
import java.util.Map;

public class JsonParser {

	Map<String, String> map = new HashMap<String, String>();

	String toString = null;

	
	public JsonParser(String jsonString) {
		
	}
	
	public JsonParser get(String name) {
		// parse toString first
		if(toString==null){
			toString = map.get(name);
		}else{
			toString = new JsonParser(toString).get(name).toString;
		}

		return this;
	}

	public JsonParser get(int index) {
		// parse toString first
		
		
		toString = map.get(index+"");

		return this;
	}

	/**
	 * this method is to get the value of certain method
	 */
	@Override
	public String toString() {
		return toString;
	}

	
	public static void main(String[] args) {
		
	}
	
	
}
